#ifndef TERRAIN_HPP_INCLUDED
#define TERRAIN_HPP_INCLUDED

#include <map>
#include <string>
#include <vector>

#include "terrain_fwd.hpp"
#include "terrain_logic.hpp"
#include "texture.hpp"
#include "wml_node_fwd.hpp"

namespace hex {

class terrain {
public:
	static void init(wml::const_node_ptr node);
	static const_terrain_ptr get(const std::string& key);

	explicit terrain(wml::const_node_ptr node);

	const std::string& id() const { return id_; }
	const std::string& name() const { return name_; }

	const std::vector<graphics::texture>& get_textures() const;
	
	const_terrain_ptr underlying() const { return underlying_; }

	int overlay_order() const { return overlay_order_; }

	game::const_base_terrain_ptr base() const { return base_; }

private:
	std::string id_, name_;
	std::vector<graphics::texture> textures_;
	const_terrain_ptr underlying_;
	int overlay_order_;

	game::const_base_terrain_ptr base_;
};

}

#endif
